<!DOCTYPE html>
<html lang="en">
    <head>
        <meta http-equiv="expires" content="0">
        <meta http-equiv="pragma" content="no-cache">
        <meta http-equiv="cache-control" content="no-cache">
        <meta charset="utf-8"/>
        <link rel="shortcut icon" type="image/x-icon" href="../../../images/jsmile.ico"/>
        <title>新增菜单</title>
        <link rel="stylesheet" href="//at.alicdn.com/t/font_763780_tdovyxg8qq9.css">
        <link rel="stylesheet" href="../../../libs/vue/theme-chalk/elementui.css">
        <link rel="stylesheet" href="../../../css/index.css">
        <script src="../../../libs/vue/vue.js"></script>
        <script src="../../../libs/jquery/jquery.mini.js"></script>
        <script src="../../../libs/vue/elementui.js"></script>
        <script src="../../../libs/layer/layer.js"></script>
        <script src="../../../javascript/kit/jsmile.js"></script>
        <script src="../../../javascript/kit/vue-ext.js"></script>
    </head>
    <body>
        <div id="app">
            <el-form ref="menu" :model="menu"  :rules="menuRules"    label-width="100px" style="padding:20px;">
                <el-row >
                    <el-col :span="10">
                        <el-form-item label="资源名称" prop="name">
                            <el-input v-model="menu.name" ></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="10">
                        <el-form-item label="资源类型" prop="menuType">
                            <el-select v-model="menu.menuType"  placeholder="请选择资源类型" style="width: 100%;">
                                <el-option
                                        v-for="item in dicts.menuType"
                                        :key="item.dictValue"
                                        :label="item.dictName"
                                        :value="item.dictValue">
                                </el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="10" :offset="1">
                        <el-form-item label="是否叶子节点" prop="leaf">
                            <el-select v-model="menu.leaf"   style="width: 100%;">
                                <el-option
                                        v-for="item in dicts.leafs"
                                        :key="item.dictValue"
                                        :label="item.dictName"
                                        :value="item.dictValue">
                                </el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="10">
                        <el-form-item label="资源路径" prop="url" >
                            <el-input v-model="menu.url"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="10" :offset="1">
                        <el-form-item label="权限编码"  prop="permCode" >
                            <el-input v-model="menu.permCode"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="10">
                        <el-form-item label="图标" prop="iconCls" >
                            <el-input v-model="menu.iconCls"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="10">
                        <el-form-item label="备注" prop="remark">
                            <el-input
                                    type="textarea"
                                    :rows="2"
                                    placeholder="备注"
                                    v-model="menu.remark">
                            </el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="10">
                        <el-form-item>
                            <el-button @click="closeDialog">取消</el-button>
                            <el-button type="primary" @click="updateMenu" :disabled="isDisabled">修改菜单</el-button>
                        </el-form-item>
                    </el-col>
                </el-row>
            </el-form>
        </div>
        <script src="../../../javascript/sys/menu/editMenu.js"></script>
    </body>
</html>